<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <meta http-equiv="Access-Control-Allow-Origin" content="*">
    <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
    <title>Template Data and Directive</title>
</head>

<body> 
    <h1>Chapter 1</h1>
    <div id="app"> 
        <p>第二条狗的名字是{{dogs[1]}}</p>
        <p>所有狗的名字是{{dogs}}</p>        
    </div>
    <script>
        new Vue({
            el: '#app',
            data() {
                return {
                    dogs:['Rex','Rover','Henrietta','Alan']
                }
            }
        });

    </script> 
</body>
</html>
